package com.system.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@JsonInclude(value = JsonInclude.Include.NON_NULL)
@ApiModel("DictDto")
public class DictDto implements Serializable {
    private static final long serialVersionUID = 1664479314912975310L;
    /**
    * 主键
    */
    @ApiModelProperty("主键")
    private String id;

    /**
    * 父主键
    */
    @ApiModelProperty("父主键")
    private String parentId;

    /**
    * 字典码
    */
    @Length(max =255 ,message = "长度不能超过255位")
    @NotEmpty(message = "字典码必填")
    @ApiModelProperty("字典码")
    private String code;

    /**
    * 
    */
    @Length(max =100 ,message = "长度不能超过100位")
    @ApiModelProperty("")
    private String dictKey;

    /**
    * 字典名称
    */
    @Length(max =255 ,message = "长度不能超过255位")
    @ApiModelProperty("字典名称")
    private String dictValue;

    /**
    * 排序
    */
    @ApiModelProperty("排序")
    @NotNull(message = "排序必填")
    private Integer sort;

    /**
    * 字典备注
    */
    @Length(max =255 ,message = "长度不能超过255位")
    @ApiModelProperty("字典备注")
    private String remark;

    /**
    * 是否已封存
    */
    @ApiModelProperty("是否已封存")
    private Integer isSealed;
    /**
     * 标签样式
     */
    @ApiModelProperty("标签样式")
    private  String listClass;
    /**
     * 是否深色标签
     */
    @ApiModelProperty("是否深色标签")
    private int iseffect;//0不是；1是

    private List<DictDto> children;

    public String getId() {
    return id;
    }

    public void setId(String id) {
    this.id = id;
    }

    public String getParentId() {
    return parentId;
    }

    public void setParentId(String parentId) {
    this.parentId = parentId;
    }

    public String getCode() {
    return code;
    }

    public void setCode(String code) {
    this.code = code;
    }

    public String getDictKey() {
    return dictKey;
    }

    public int getIseffect() {
        return iseffect;
    }

    public void setIseffect(int iseffect) {
        this.iseffect = iseffect;
    }

    public void setDictKey(String dictKey) {
    this.dictKey = dictKey;
    }

    public String getDictValue() {
    return dictValue;
    }

    public void setDictValue(String dictValue) {
    this.dictValue = dictValue;
    }

    public Integer getSort() {
    return sort;
    }

    public void setSort(Integer sort) {
    this.sort = sort;
    }

    public String getRemark() {
    return remark;
    }

    public void setRemark(String remark) {
    this.remark = remark;
    }

    public Integer getIsSealed() {
    return isSealed;
    }

    public void setIsSealed(Integer isSealed) {
    this.isSealed = isSealed;
    }
    public List<DictDto> getChildren() {
        return children;
    }

    public void setChildren(List<DictDto> children) {
        this.children = children;
    }

    public String getListClass() {
        return listClass;
    }

    public void setListClass(String listClass) {
        this.listClass = listClass;
    }

    @Override
    public String toString() {
        String sb = getClass().getSimpleName() +
                " [" +
                "Hash = " + hashCode() +
                ", id=" + id +
                ", parentId=" + parentId +
                ", code=" + code +
                ", dictKey=" + dictKey +
                ", dictValue=" + dictValue +
                ", sort=" + sort +
                ", remark=" + remark +
                ", isSealed=" + isSealed +
                "]";
        return sb;
        }

}